package com.wehealth.adapter;

import java.util.List;

import com.wehealth.R;
import com.wehealth.dm.DM_Questionnaire_page2_item;
import com.wehealth.dm.DM_Questionnaire_page3_item;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.TextView;

public class Adapter_questionnaire_page4 extends BaseAdapter{
	
	private Context ctx;
	private String[] mList;
	
	
	public Adapter_questionnaire_page4(Context context,String[] mList){
		ctx =context;
		this.mList =mList;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mList.length;
	}

	@Override
	public Object getItem(int pos) {
		// TODO Auto-generated method stub
		return pos;
	}

	@Override
	public long getItemId(int pos) {
		// TODO Auto-generated method stub
		return pos;
	}

	@Override
	public View getView(int pos, View arg1, ViewGroup arg2) {
		// TODO Auto-generated method stub
		View view = LayoutInflater.from(ctx).inflate(R.layout.questionnaire_page4_list_item_plan,null);
		CheckBox   cb =(CheckBox)view.findViewById(R.id.quetionnaire_page4_item_cb);
		String plan_item = mList[pos];
		cb.setText(plan_item);
		return view;
	}
		
}
